AEGetKeyDesc
AEGetKeyDesc Get keyword-specfified descriptor record
#include <AppleEvents.h> Apple Event Manager
OSErr AEGetKeyDesc( theAERecord, theAEKeyword, desiredType,
AERecord * theAERecord ; descriptor list to be counted
AEKeyword theAEKeyword ; Apple Event keyword
DescType desiredType ; descriptor type
AEDesc * result ; Desired descriptor record
returns Error Code; 0 = no error
You can use the AEGetKeyDesc function to get the descriptor record for a
keyword-specified descriptor record.
The AEGetKeyDesc function returns a copy of the descriptor record for a
keyword-specified descriptor record. Your application should call the
AEDisposeDesc function to dispose of the resulting descriptor record after
your application has finished using it.
The AEGetKeyDesc function returns the descriptor record for a
keyword-specified descriptor record. You can use this function to get a
descriptor record out of an AE record or an Apple event.
The parameter theAERecord is the AE record from which to get the descriptor
record.
The parameter theAEKeyword is the keyword that specifies the descriptor
record to be returned.
The desiredType parameter specifies the descriptor type of the resulting
descriptor record; if the original descriptor record is not of this type, the
Apple Event Manager attempts to coerce it into this type. If the value of
desiredType is typeWildCard, no coercion is performed, and the descriptor
type of the resulting descriptor record is the same as the descriptor type of
the original descriptor record.
The AEGetKeyDesc function returns in the result parameter the resulting
descriptor record. This function creates a new descriptor record by copying
the descriptor record from the AE record. Your application is responsible for
using the AEDisposeDesc function to dispose of the resulting descriptor
record once you are finished using it.
If the function returns a nonzero result code, a descriptor record with the
typeNull descriptor type is returned. A descriptor record of this type does not
contain any data.
Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone
errAECoercionFail (-1700) Data could not be coerced to descriptor type
errAEDescNotFound (-1701) Descriptor record was not found
errAENotAEDesc (-1704) Not a valid descriptor record
errAEReplyNotArrived (-1718) Reply has not yet arrived